package com.zhangzhan.blog_api.controller;


import com.zhangzhan.base.common_model.result.ResponseResult;
import com.zhangzhan.blog_model.vos.GetCategoryVo;
import com.zhangzhan.blog_service.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 分类表 前端控制器
 * </p>
 *
 * @author zhangzhan
 * @since 2024-01-30
 */
@RestController
@RequestMapping("/category")
public class CategoryController {

    @Autowired
    private CategoryService categoryService;

    /**
     * 插叙文章分类
     */
    @RequestMapping(value = "/getCategoryList",method = RequestMethod.GET)
    private ResponseResult<List<GetCategoryVo>> list(){
        return ResponseResult.okResult(categoryService.getCategoryList());
    }




}

